function PickRestaurantController(){
    $.ajax({
        url:"get_restaurant",
        type:"GET",
        dataType:"json",
        success:function(data){
            data.forEach(function(name){
                var list_one = "<a href='../pages/order-meal.html'><li type='button' class='list-style-3' onclick='SetRestaurantInfo(" + '"' + name.RestaurantName + ' " ' + ','+'"'+name.id+'"'+")'>" + name.RestaurantName + "</li></a>";
                $("ul").append(list_one);
            })
        }})
}

function SetRestaurantInfo(RestaurantName,RestaurantId) {
    var restaurant = new Restaurant(RestaurantName,RestaurantId);
    restaurant.save()
}

